import cache from "./cache";
import type { App } from "vue";
// import socket from "./socket";
import tab from "./tab";
import animate from "@/animate";
import { useDict } from "@/utils/dict";
import { addDateRange, handleTree, parseTime, selectDictLabel, selectDictLabels } from "@/utils/asiainfo";

export default function installPlugin(app: App) {
  // app.config.globalProperties.$socket = socket;
  app.config.globalProperties.useDict = useDict;
  app.config.globalProperties.handleTree = handleTree;
  app.config.globalProperties.addDateRange = addDateRange;
  app.config.globalProperties.selectDictLabel = selectDictLabel;
  app.config.globalProperties.selectDictLabels = selectDictLabels;
  app.config.globalProperties.parseTime = parseTime;
  app.config.globalProperties.animate = animate;
  // 页签操作
  app.config.globalProperties.$tab = tab;
  // 缓存对象
  app.config.globalProperties.$cache = cache;
}
